/**
 * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com).
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.springblade.modules.restaurant.service;

import cn.hutool.core.date.DateTime;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseService;
import org.springblade.modules.restaurant.entity.UserSalaryDay;
import org.springblade.modules.restaurant.excel.UserSalaryDayExcel;
import org.springblade.modules.restaurant.vo.UserSalaryDayVO;

import java.math.BigDecimal;
import java.util.List;

/**
 * 用户日薪表 服务类
 *
 * @author Blade
 * @since 2025-02-18
 */
public interface IUserSalaryDayService extends BaseService<UserSalaryDay> {

	/**
	 * 自定义分页
	 *
	 * @param page
	 * @param userSalaryDay
	 * @return
	 */
	IPage<UserSalaryDayVO> selectUserSalaryDayPage(IPage<UserSalaryDayVO> page, UserSalaryDayVO userSalaryDay);


	void gen(DateTime startTime, DateTime endTime);

	/**
	 * 获取用户日薪 (当月总和)
	 *
	 * @param businessTime yyyy-MM-dd
	 * @param tenantId
	 * @return
	 */
	BigDecimal getUserDailySalaryMonthSum(String businessTime, String tenantId);

	/**
	 * 获取用户日薪 总和
	 *
	 * @param day      yyyy-MM-dd
	 * @param tenantId
	 * @return
	 */
	BigDecimal userSalaryDaySum(String day, String tenantId);

	/**
	 * 导出
	 *
	 * @param salaryDays
	 * @return
	 */
	List<UserSalaryDayExcel> export(List<UserSalaryDay> salaryDays);

	/**
	 * 保存
	 *
	 * @param userSalaryDay
	 * @return
	 */
	boolean saveUserSalaryDay(UserSalaryDay userSalaryDay);

	/**
	 * 判断是否存在
	 *
	 * @param id
	 * @param userId
	 * @param time
	 * @return
	 */
	boolean isExist(Long id, Long userId, String time);
}
